package com.ygqh.baby.service;

import com.ygqh.baby.ao.JobStatus;
import com.ygqh.baby.ao.Message;
import com.ygqh.baby.ao.QueryInfo;
import com.ygqh.baby.ao.ResultSet;
import com.ygqh.baby.model.BmdismLadderModel;
import com.ygqh.baby.model.BmdismModel;
import com.ygqh.baby.model.YgShoppingCarModel;
import com.ygqh.baby.po.YgBmdism;
import com.ygqh.baby.po.YgProduct;

import java.util.Date;
import java.util.List;

public interface YgBmdismService {

    List<YgBmdism> find(JobStatus jobStatus);

    int findCount(JobStatus jobStatus);

    YgBmdism findById(Long id);

    int deleteSoft(Long[] ids);

    int deleteSoft(Long id);

    int save(YgBmdism ygBmdism);

    int update(YgBmdism ygBmdism);

    int saveOrUpdate(YgBmdism ygBmdism);

    ResultSet<YgBmdism> search(QueryInfo queryInfo, String title, Date startDate, Date endDate, JobStatus jobStatus, String q);

    List<YgProduct> findProductByBmdism(QueryInfo queryInfo, Long bmdismId, String productName);

    String addToRedis(YgBmdism ygBmdism);

    List<BmdismModel> findByProductIds(Long... productIds);

    void getBestBmdism(List<YgShoppingCarModel> carList);

    Message addBmdism(YgBmdism ygBmdism);

    /**
     * 根据商品id获取多买多折信息 多阶梯
     *
     * @param productIds 商品id
     * @return  List<BmdismLadderModel>
     */
    List<BmdismLadderModel> findBmdismListWithLadderByProductIds(Long... productIds);
}
